<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>稻草FAQ登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="browser_components/bootstrap/dist/css/bootstrap.css">
    <link rel="stylesheet" href="browser_components/font-awesome/css/font-awesome.css">
    <link rel="stylesheet" href="css/login.css">
</head>
<body class="bg-light">
<div class="container-fluid">
    <div class="row">
        <div class="mx-auto mt-5" style="width: 400px;">
            <h2 class="text-center ">稻草问答系统</h2>
            <div class="bg-white p-4">
                <p class="text-center">用户登录</p>
                <div id="error" class="alert alert-danger d-none">
                    <i class="fa fa-exclamation-triangle"></i> 账号或密码错误
                </div>
                <div id="logout" class="alert alert-info d-none">
                    <i class="fa fa-exclamation-triangle"></i> 已经登出系统
                </div>
                <div id="register" class="alert alert-info d-none">
                    <i class="fa fa-exclamation-triangle"></i> 已经成功注册，请登录。
                </div>
                <form action="/login" method="post">
                    <div class="form-group has-icon">
                        <input type="text" class="form-control d-inline" name="username" placeholder="手机号" value="13131348224">
                        <span class="fa fa-phone form-control-icon"></span>
                    </div>
                    <div class="form-group has-icon">
                        <input type="password" class="form-control" name="password" placeholder="密码" value="1234">
                        <span class="fa fa-lock form-control-icon"></span>
                    </div>
                    <button type="submit" class="btn btn-primary btn-block ">登录</button>
                </form>
                <a class="d-block mt-1" href="resetpassword.html">忘记密码？</a>
                <a class="d-block mt-1" href="register.html">新用户注册</a>
            </div>
        </div>
    </div>
</div>
<script src="browser_components/jquery/dist/jquery.js"></script>
<script src="browser_components/bootstrap/dist/js/bootstrap.js"></script>
<script>
    if (location.search == "?error") {
        $("#error").removeClass("d-none");
    }
    if (location.search == "?logout") {
        $("#logout").removeClass("d-none");
    }
    if (location.search == "?register") {
        $("#register").removeClass("d-none");
    }
</script>
</body>
</html>
